package test.patterns;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class IteratorBrugAf {

	
	public static void main(String[] arg) {
		List<String> list = new ArrayList<String>();
		
		list.add("hest");
		list.add("hEest");
		list.add("heSst");
		list.add("hesTt");
		list.add("1hest");
		list.add("h2est");
		list.add("he3st");
		
		for (String s: list) {
			System.out.println(s);
		}
		
		for (Iterator<String> iterator = list.iterator(); iterator.hasNext(); ) {			
			System.out.println(iterator.next());
		}
	}
}
